import http from "@/utils/request"

// 获取基地对应鸽棚
export function getAllDovecoteNumber(id) {
  return http({
    url: `/breed/dovecote/getAllDovecoteNumber?baseId=${id}`,
    method: 'get',
  });
}
// 投喂记录
export function userslist(current,size,data) {
    return http({
      url: `/breed/feedHistory/list/${current}/${size}`,
      params:data,
      method: 'get',
    });
}
export function adduser(data) {
  return http({
    url: `/breed/feedHistory/save`,
    method: 'post',
    data:data
  });
}
export function edituser(userid,data) {
  return http({
    url: `/breed/feedHistory/update/${userid}`,
    method: 'post',
    data:data
  });
}
export function deleteuser(userid) {
  return http({
    url: `/breed/feedHistory/delete/${userid}`,
    method: 'delete'
  });
}
export function multipledelete(data) {
  return http({
   url: `/breed/feedHistory/deleteList?idList=${data}`,
   method: 'delete',
  });
}
// 投喂机器
export function machinelist(current,size,data) {
  return http({
    url: `/breed/feedMachine/list/${current}/${size}`,
    params:data,
    method: 'get',
  });
}
export function editmachine(userid,data) {
  return http({
    url: `/breed/feedMachine/update/${userid}`,
    method: 'post',
    params:data
  });
}
export function deletemachine(userid) {
  return http({
    url: `/breed/feedMachine/delete/${userid}`,
    method: 'delete'
  });
}
export function addmachine(data) {
  return http({
    url: `/breed/feedMachine/save`,
    method: 'post',
    data:data
  });
}
export function multimachinedelete(data) {
  return http({
   url: `/breed/feedMachine/deleteList?idList=${data}`,
   method: 'delete',
  });
}
export function openmachine(machineNumber) {
  return http({
   url: `/breed/feedMachine/open?machineNumber=${machineNumber}`,
   method: 'post',
  });
}
export function closemachine(data) {
  return http({
   url: `/breed/feedMachine/shutdown/`,
   params:data,
   method: 'post',
  });
}